package text;

class Sum{
	int a=0;
	public int getSum(int begin,int end) {
		
		for(;begin<=end;begin++)
			a+=begin;
		return a;
			
	}
}
public class main1 {
	public static void main(String[] args) {
		Sum p=new Sum();
		System.out.println(p.getSum(2,6));
	}
}
